<admintpl file="header" />


<link href="__TMPL__Public/assets/css/infomation.css" rel="stylesheet" />

</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
            <li><a href="{:U('ConstructionCommand/gcstart')}">工程开工令管理</a></li>
            <li><a href="{:U('ConstructionCommand/gcstart_add')}">新增工程开工令</a></li>
            <li class="active"><a href="{:U('ConstructionCommand/gcstart_add', array('id'=>I('request.id/s','')))}">编辑工程开工令</a></li>
        </ul>
		<form method="post" class="form-horizontal js-ajax-form form-inline tg" action="{:U('ConstructionCommand/gcstart_edit_post')}">
		    <section class="tab-pane active fade in" id="access">
                <div class="row">
                    <div class="col-xs-12 col-md-12 col-lg-12">
                        <div class="panel panel-info">
							<input type="hidden" name="id" value="{$result.id}" />
                            <div class="panel-body">
                                <div class="row tg-header">
                                    <div class="col-md-12 text-center">
                                        <h3>工程开工令</h3>
                                        <hr />
                                    </div>
                                    <div class="col-md-12">
                                        <p class="tg-to"><label>工程名称:</label><input type="text" class="input-xt input-deptname" value="{$job_name}" /></p>
                                        <p class="pull-right tg-serialnum"><label>编号:</label><input class="input-xt" name="code" value="{$result.code}" required /></p>
                                    </div>
                                </div>
                                <div class="well">
                                    <p>致:
                                    	<select name="executing_department_management" required >
                                            <option></option>
                                            <volist name="depts" id="vo">
                                            	<option <if condition="$result['executing_department_management'] eq $vo['department_name']">selected</if>>
                                            		{$vo.department_name}
                                            	</option>
                                    		</volist>
                                        <select>(施工单位)
                                    </p>
                                    <p class="indent20">
                                        经审查，本工程已具备施工合同约定的开工条件，现同意你方开始施工，开工日期为：<input type="text" class="js-date input-xt input-date date" name="begin_construction_time" value="{$result.begin_construction_time}" required />。
                                    </p>
                                    <p class="tg-content">
                                        附件
                                        <div class="controls">
                                            <a class="btn upBtn btn-primary" href="javascript:void(0);">上传</a>
                                            <input type="file" id="upFile" name="upFile" style="display:none" />
                                        </div>
                                        <foreach name="results" item="vo">
                                            <div class='controls' style='margin-top:10px;margin-left:20px'>
                                                <a class="fileDownload" path="{$vo.file_path}" name="{$vo.file_name}" data-type="{$vo.file_type}">{$vo.file_name}</a>
                                                <a href='javascript:void(0)' class='btn btn-danger btn-xs delFile' value="{$vo.id}">删除</a>
                                            </div>
                                        </foreach>
                                    </p>

                                    <div class="signature">
                                        <p>项目监理机构(盖章)</p>
                                        <p>总监理工程师(签字、加盖执业印章)</p>

                                    </div>
                                    <p class="signature-date">
                                        <span>年</span>
                                        <span>月</span>
                                        <span>日</span>
                                    </p>

                                </div>
                                <p class="text-muted tg-note">
                                    <small>注：本表一式三份，项目监理机构、建设单位、施工单位各一份。</small>
                                </p>
                                <div class="form-actions">
                                    <button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button>
                                    <if condition="$Role == 3 || $Role == 0">
                                        <input type="hidden" value="{$news.is_publish}" name="is_publish" id="is_publish">
										<input type="submit" class="btn btn-warning" id="btnPublish" value="发布"/>
                                    </if>
                                    <a class="btn btn-default" href="javascript:history.back(-1);">{:L('BACK')}</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
    <script type="text/javascript">
		$(document).ready(function(e) {
			// 选择图片
			$(document).on("click", ".upBtn", function(e) {
				$("#upFile").click();
			});
			// 文件选择器change事件
			$("#upFile").on("change", function(){
				UploadFile("{:U('ConstructionCommand/upload')}", "gcstart");
			});
			$(document).on("click", ".delFile", function(){
				if($(this).attr("value") != undefined){
					delFile("{:U('ConstructionCommand/delFile')}", $(this).attr("value"), $(this))
				} else {
					$(this).closest("div").remove();
				}
			});
		});
	</script>
</body>
</html>